#pragma once
#include "GameComponent.hpp"
#include <map>
#include "SLB.hpp"

namespace Typhoon {

	class ScriptObject {
	public:
		ScriptObject();
		virtual ~ScriptObject();

		float test;

	};

	class Vector : public ScriptObject {
	public:
		Vector();
		~Vector();

		float x;
		float y;
	};

	class ScriptValues {
	public:
		
		void setObject(const char* k, ScriptObject* obj);
		ScriptObject* getObject(const char* k);
		void Copy(const ScriptValues& source);
	private:
		typedef std::map<const char*, ScriptObject*> ObjectMap;
		ObjectMap objectMap;

	};


	class ScriptComponent : public GameComponent<ScriptComponent>
	{
	public:
		ScriptComponent();
		~ScriptComponent();

		const char* get(const char* key);
		void set(const char* k, const char* v);

		
		
		static void InitScripting();

		static const int GetIndex();

		static int IndexToReturn;

		int GetId();

		void Copy(const ScriptComponent& source);

		ScriptValues* Values;

	private:
		typedef std::map<const char*, const char*> Map;
		Map map;
		int index;

		

	};
}